]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Close on lock
authorIvan Molodetskikh <yalterz@gmail.com>
Wed, 2 Feb 2022 18:11:03 +0000 (21:11 +0300)
committerMarge Bot <marge-bot@gnome.org>
Thu, 3 Feb 2022 16:24:43 +0000 (16:24 +0000)
Since the screenshot UI cannot open in GDM or on the lock screen, it
seems that simply closing it on any session mode update is sufficient,
without adding extra variables.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4996

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2149>

js/ui/screenshot.js

index 56f3cab7f1f0f52331e4241b2a949c4fbb92b670..fc3334fb7316026445fe4b4e10d0f3a76bacf3db 100644 (file)
@@ -1020,6 +1020,8 @@ var ScreenshotUI = GObject.registerClass({
 
         this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
 
+        Main.sessionMode.connect('updated', () => this.close(true));
+
         // The full-screen screenshot has a separate container so that we can
         // show it without the screenshot UI fade-in for a nicer animation.
         this._stageScreenshotContainer = new St.Widget({ visible: false });